<div class="main-view"><!--最外层div-->
    <div class="left-margin top-margin"><strong class="am-text-primary am-text-lg">用户管理</strong></div>

    <form class="am-form-inline left-margin top-margin" role="form">

        <div class="city-cascading" style="display: inline-block;" id="cascad-search"></div>
        <label>注册时间:</label>
        <input type="text" id="startDate" class="datepicker" size="12"  style="height: 32px" data-date-format="yyyy-mm-dd">
        <label>至：</label>
        <input type="text" id="endDate" class="datepicker" size="12" style="height: 32px" sdata-date-format="yyyy-mm-dd">
        <div class="top-margin">
            <label>用户ID</label> <input type="text" class="am-form-field" ng-model="option.userId">
            <label>手机号</label> <input type="text" class="am-form-field" ng-model="option.phone">
            <label class="left-margin">昵称</label> <input type="text" class="am-form-field" ng-model="option.nickName">
            <label class="left-margin">V用户：</label>
            <select data-am-selected="{btnSize: 'sm'}" ng-model="option.authenticationStatus" style="margin-left: 0px;">
                <option value=false>否</option>
                <option value=true>是</option>
            </select>

            <!--<label>达人：</label>-->
            <!--<select data-am-selected="{btnSize: 'sm'}" ng-model="option.talent" style="margin-left: 0px;">-->
                <!--<option value='normalAppUser'>否</option>-->
                <!--<option value='talent'>是</option>-->
            <!--</select>-->

            <label>角色：</label>
            <select data-am-selected="{btnSize: 'sm'}" ng-model="option.role" style="margin-left: 0px;">
                <option value=1>版主</option>
                <!--<option value=2>物业</option>-->
                <option value=3>雷锋团</option>
            </select>


            <button id="search-target" type="submit" class="am-btn am-btn-primary left-margin" ng-click="search()"
                    data-target="cascad-search">搜索
            </button>
        </div>
    </form>
    <br>
    <div class="am-btn-group am-btn-group-xs left-margin top-margin">
        <!--<button type="button" class="am-btn am-btn-default" data-am-modal="{target: '#doc-modal-add', width: 800, height: 600}"><span class="am-icon-plus"></span>添加二手</button>-->
        <!--<button type="button" class="am-btn am-btn-default" ng-click="delete()"><span class="am-icon-trash-o"></span> 删除</button>-->
        <button type="button" class="am-btn am-btn-default" ng-click="exportUser(option, $event)" data-target="cascad-search"><span class="am-icon-download"></span> 导出</button>
    </div>
    <div id="pagination" class="pagination"></div>
    <div class="pagination-table left-margin" id="tab_menu" style = "margin-top: 0px;">
        <form class="am-form">
            <table class="am-table am-table-striped am-table-hover table-main">
                <thead>
                <tr>
                    <th class="table-check"><input type="checkbox" ng-click="allSelected()"></th>
                    <th class="table-id">用户ID</th>
                    <th class="table-id">设备ID</th>
                    <th class="table-title">手机号码</th>
                    <th class="table-title">来源</th>
                    <th class="table-title">昵称	</th>
                    <th class="table-title">性别</th>
                    <th class="table-title">城市</th>
                    <th class="table-title">小区</th>
                    <th class="table-title">详细地址</th>
                    <th class="table-title">父母小区</th>
                    <th class="table-title">V用户</th>
                    <!--<th class="table-title">达人</th>-->
                    <!--<th class="table-title">达人描述</th>-->
                    <th class="table-title">角色</th>
                    <th class="table-title">黑名单</th>

                    <!-- 宝宝树66小区二次改造    add   guo.xiaomin  20170802   start    -->
                    <th class="table-title">禁言</th>
                    <!-- 追加禁言功能-guo.xioamin-20170802-end -->

                    <th class="table-title">创建日期</th>
                    <th class="table-title">备注</th>
                    <th class="table-title">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="user in userList"  id = "{{user.objId}}">
                    <td class="table-check"><input type="checkbox" class = "item-check"></td>

                    <td>{{user.objId}}</td>
                    <td>{{}}</td>
                    <td>{{user.mobilePhone}}</td>
                    <td>{{user.regChannelId}}</td>
                    <td>{{user.nickName}}</td>
                    <td>{{user.gender}}</td>
                    <td>{{user.cityId.name}}</td>
                    <td>{{user.community.communityName}}</td>
                    <td>{{user.apartmentDetail}}</td>
                    <td>{{user.parentsCommunityName}}</td>
                    <td>{{user.authenticationStatus ? '是':'否'}}</td>
                    <!--<td>{{user.userType=='talent' ? '是':'否'}}</td>-->
                    <!--<td>{{user.speciality}}</td>-->
                    <td>{{user.userRoles}}</td>
                    <!--<td ng-show="user.userRole[0]==1">版主</td>-->
                    <!--<td ng-show="!user.userRole[0]"></td>-->
                    <!--<td ng-show="user.userRole[0]==3">雷锋团</td>-->
                    <td>{{user.frozenOrNot ? '是':'否'}}</td>

                    <!-- 宝宝树66小区二次改造    add   guo.xiaomin  20170802   start    -->
                    <td>{{user.gagOrNot ? '是':'否'}}</td>
                    <!-- 宝宝树66小区二次改造    add   guo.xiaomin  20170802   end    -->

                    <td>{{user.dateCreated | date:'yyyy-MM-dd'}}</td>
                    <td>{{user.remark}}</td>
                    <td>
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">

                                <!--<button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</button>-->
                                <!--<button class="am-btn am-btn-default am-btn-xs "><span class="am-icon-copy"></span> 复制</button>-->
                                <!--<button class="am-btn am-btn-default am-btn-xs am-text-danger"><span class="am-icon-trash-o"></span> 删除</button>-->

                                <button ng-hide="user.frozenOrNot" data-am-modal="{target: '#doc-modal-pullblackOK-{{$index}}', width: 800, height: 450}" class="am-btn am-btn-default am-btn-xs am-text-danger">
                                    <span class="am-icon-pencil-square-o"></span>拉黑</button>

                                <button ng-show="user.frozenOrNot" data-am-modal="{target: '#doc-modal-pullblackCancel-{{$index}}', width: 800, height: 450}" class="am-btn am-btn-default am-btn-xs am-text-secondary">
                                    <span class="am-icon-pencil-square-o"></span>拉白</button>

                                <!-- /*  宝宝树66小区三期改造    添加删除按钮 mod   luolh  20170929   start   */ -->
                                <button ng-hide="user.frozenOrNot" data-am-modal="{target: '#doc-modal-userDelete-{{$index}}', width: 800, height: 450}" class="am-btn am-btn-default am-btn-xs am-text-danger">
                                    <span class="am-icon-pencil-square-o"></span>删除</button>
                                <!-- /*  宝宝树66小区三期改造    添加删除按钮 mod   luolh  20170929   end     */ -->


                                <!-- 追加禁言功能-guo.xioamin-20170802-start -->
                                <button ng-hide="user.gagOrNot" data-am-modal="{target: '#doc-modal-speakNotAllowOK-{{$index}}', width: 800, height: 450}" class="am-btn am-btn-default am-btn-xs am-text-danger">
                                    <span class="am-icon-pencil-square-o"></span>禁言</button>

                                <button ng-show="user.gagOrNot" data-am-modal="{target: '#doc-modal-speakNotAllowCancel-{{$index}}', width: 800, height: 450}" class="am-btn am-btn-default am-btn-xs am-text-secondary">
                                    <span class="am-icon-pencil-square-o"></span>发言</button>
                                <!-- 追加禁言功能-guo.xioamin-20170802-end -->

                                <button data-am-modal="{target: '#doc-modal-Detail-{{$index}}', width: 1000, height: 520}" ng-click="editClick(user,$index)" class="am-btn am-btn-default am-btn-xs am-text-secondary">
                                    <span class="am-icon-copy"></span>详细信息</button>

                                <button ng-show="user.authenticationStatus==false&&user.frozenOrNot==false" data-am-modal="{target: '#doc-modal-V-OK-{{$index}}', width: 800, height: 200}"
                                        class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span>升级V</button>
                                <button ng-show="user.authenticationStatus==true && user.userType!='talent'" data-am-modal="{target: '#doc-modal-V-Cancel-{{$index}}', width: 800, height: 200}"
                                        class="am-btn am-btn-default am-btn-xs am-text-danger"><span class="am-icon-pencil-square-o"></span>取消V</button>

                                <!--  宝宝树66小区二次改造    mod   gct  20170811  start    -->
                                <button disabled ng-show=getUserRole(user.userRole,1) data-am-modal="{target: '#doc-modal-moderator-Cancel-{{$index}}', width: 800, height: 200}"
                                        class="am-btn am-btn-default am-btn-xs am-text-danger"><span class="am-icon-pencil-square-o"></span>取消版主</button>
                                <!--  宝宝树66小区二次改造    mod   gct  20170811  end    -->

                                <button ng-show=getUserRole(user.userRole,3) data-am-modal="{target: '#doc-modal-leifeng-Cancel-{{$index}}', width: 800, height: 200}"
                                        class="am-btn am-btn-default am-btn-xs am-text-danger"><span class="am-icon-pencil-square-o"></span>取消雷锋</button>

                                <!--<button ng-show="user.authenticationStatus==true&&user.userType!='talent'&&user.frozenOrNot==false" data-am-modal="{target: '#doc-modal-talentOK-{{$index}}', width: 800, height: 350}"-->
                                        <!--class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span>升级达人</button>-->
                                <!--<button ng-show="user.userType =='talent'" data-am-modal="{target: '#doc-modal-talentCancel-{{$index}}', width: 800, height: 200}"-->
                                        <!--class="am-btn am-btn-default am-btn-xs am-text-danger"><span class="am-icon-pencil-square-o"></span>取消达人</button>-->
                                <button ng-show="user.authenticationStatus==true&&user.userRoles.indexOf('雷锋')==-1" data-am-modal="{target: '#doc-modal-lf-{{$index}}', width: 800, height: 200}" class="am-btn am-btn-default am-btn-xs am-text-secondary">
                                    <span class="am-icon-pencil-square-o"></span>升雷锋</button>

                                <button data-am-modal="{target: '#doc-modal-parents-{{$index}}', width: 1000, height: 260}" ng-click="editParents(user,$index)" class="am-btn am-btn-default am-btn-xs am-text-secondary">
                                    <span class="am-icon-copy"></span>父母小区</button>

                                <!--拉黑-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-pullblackOK-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">用户拉黑
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class="am-modal-bd body-area">
                                            <div class = "text-left">
                                                <form>
                                                    <div><label>用户昵称:</label><label>{{user.nickName}}</label></div><br>
                                                    <div><label>拉黑原因:</label><textarea type="text" class = "modal-textarea" ng-model="addData.reason"></textarea></div>
                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="pullBlack(user, addData, true, $index)">拉黑</button>
                                        </div>
                                    </div>
                                </div>

                                <!--取消拉黑-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-pullblackCancel-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">取消拉黑
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class="am-modal-bd body-area">
                                            <div class = "text-left">
                                                <form>
                                                    <div><label>用户昵称:</label><label>{{user.nickName}}</label></div><br>
                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="pullBlack(user, addData, false, $index)">取消拉黑</button>
                                        </div>
                                    </div>
                                </div>

                                <!-- 追加禁言功能-guo.xioamin-20170802-start -->
                                <!--禁言-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-speakNotAllowOK-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">用户禁言
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class="am-modal-bd body-area">
                                            <div class = "text-left">
                                                <form>
                                                    <div><label>用户昵称:</label><label>{{user.nickName}}</label></div><br>
                                                    <div><label>禁言原因:</label><textarea type="text" class = "modal-textarea" ng-model="addData.reason"></textarea></div>
                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="speakNotAllow(user, addData, true, $index)">禁言</button>
                                        </div>
                                    </div>
                                </div>

                                <!-- 宝宝树66小区三期 追加删除功能-luolh -2017099 -start -->
                                <!--删除用户-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-userDelete-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">用户删除
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class="am-modal-bd body-area">
                                            <div class = "text-left">
                                                <form>
                                                    <div><label>用户昵称:</label><label>{{user.nickName}}</label></div><br>
                                                    <div><label>删除原因:</label><textarea type="text" class = "modal-textarea" ng-model="addData.reason"></textarea></div><br>
                                                    <div><label>删除数据:&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" class = "item-check" ng-model="addData.delUserData"></label></div>
                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="userDelete(user, addData, true, $index)">删除</button>
                                        </div>
                                    </div>
                                </div>
                                <!-- 宝宝树66小区三期 追加删除功能-luolh -2017099 -end -->
                                <!--取消禁言-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-speakNotAllowCancel-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">取消禁言
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class="am-modal-bd body-area">
                                            <div class = "text-left">
                                                <form>
                                                    <div><label>用户昵称:</label><label>{{user.nickName}}</label></div><br>
                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="speakNotAllow(user, addData, false, $index)">取消禁言</button>
                                        </div>
                                    </div>
                                </div>
                                <!-- 追加禁言功能-guo.xioamin-20170802-end -->

                                <!--升级V-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-V-OK-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">确认设置为V用户？
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>

                                        <div class = "button-area border-top">
                                            <br>
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="handleVStatus(user, true ,$index)">升级V</button>
                                        </div>
                                    </div>
                                </div>


                                <!--取消V-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-V-Cancel-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">确认取消V用户？
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>

                                        <div class = "button-area border-top">
                                            <br>
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="handleVStatus(user, false ,$index)">取消V</button>
                                        </div>
                                    </div>
                                </div>


                                <!--升级达人-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-talentOK-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">确认升级达人？
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class="am-modal-bd body-area">
                                            <div class = "text-left">
                                                <form>
                                                    <div><label>备注:</label><textarea type="text" class = "modal-textarea" ng-model="addData.talentDesc"></textarea></div>
                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="updateUserInfo(user, $index)">升级达人</button>
                                        </div>
                                    </div>
                                </div>


                                <!--取消达人-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-talentCancel-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">确认取消达人？
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <br>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="talentAction(user, addData, false, $index)">取消达人</button>
                                        </div>
                                    </div>
                                </div>

                                <!--取消版主-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-moderator-Cancel-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">确认取消版主？
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="rejectRole(user, 1, $index)">取消版主</button>
                                        </div>
                                    </div>
                                </div>

                                <!--取消雷锋-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-leifeng-Cancel-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">确认取消雷锋？
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="rejectRole(user, 3, $index)">取消雷锋</button>
                                        </div>
                                    </div>
                                </div>

                                <!--用户详细信息（编辑）-->
                                <div class="am-modal am-modal-no-btn" id="doc-modal-Detail-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">用户详细信息
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>
                                        <div class="am-modal-bd body-area">
                                            <div style = "width:80%" class = "text-left">
                                                <form class="am-form-inline">
                                                    <!--  宝宝树66小区二次改造    mod   gct  20170802   start   -->
                                                    <div><label>用户昵称:</label><label><input type="text" class = "modal-input" style = "width: 200px;display: inline-block;" ng-model="user.nickName"></label></div>
                                                    <input type="hidden" id="oldCommunity" value="" ng-model="user.community.objId">
                                                    <!--
                                                    <div><label>用户昵称:</label><label>{{user.nickName}}</label></div>
-->
                                                    <br><div><label>手机:</label><label><input type="text" class = "modal-input" style = "width: 200px;display: inline-block;" ng-model="user.mobilePhone"></label></div><br>
<!--                                                <!--  宝宝树66小区二次改造    mod   gct  20170802   start   -->
                                                   <!-- <br><div><label>手机:</label><label><input type="text" class = "modal-input" style = "width: 200px;display: inline-block;" ng-model="user.nickName">{{user.mobilePhone}}</label></div><br>
&ndash;&gt;-->
                                                    <!--<div><label>手机:</label><input type="text" class = "modal-input" style = "width: 200px;display: inline-block;" ng-model="user.mobilePhone"></div>-->


                                                    <div class = "city-cascading" style = "display: inline-block;" id = "cascad-edit-{{$index}}"></div>


                                                    <div><label>性别：</label>
                                                        <select data-am-selected="{btnSize: 'sm'}" ng-model="user.gender" style = "margin-left:-3px; width: 200px;display: inline-block;">
                                                        <option value='女'>女</option>
                                                        <option value='男'>男</option>
                                                    </select></div>

                                                    <!--<div><label>出生年月:</label><input type="text" class = "modal-input" style = "width: 200px;display: inline-block;" ng-model="user.birthDate"></div>-->
                                                    <br><div><label>出生年月:</label><label>{{user.birthDate | date:'yyyy-MM-dd'}}</label></div><br>

                                                    <div><label>达人：</label>
                                                    <select data-am-selected="{btnSize: 'sm'}" disabled="true" ng-model="user.userType"  style = "margin-left:-3px; width: 200px;display: inline-block;">
                                                        <option value='normalAppUser'>否</option>
                                                        <option value='talent'>是</option>
                                                    </select></div>

                                                    <div><label>V用户：</label>
                                                    <select data-am-selected="{btnSize: 'sm'}" disabled="true" ng-model="user.authenticationStatus" style = "margin-left:-3px; width: 200px;display: inline-block;">
                                                        <option value=false>否</option>
                                                        <option value=true>是</option>
                                                    </select></div>


                                                    <div><label>单元:</label><input type="text" class = "modal-input" style = "width: 200px;display: inline-block;" ng-model="user.roomUnit"></div>
                                                    <div><label>房间:</label><input type="text" class = "modal-input" style = "width: 200px;display: inline-block;" ng-model="user.roomNumber"></div>
                                                    <br>

                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <!--  宝宝树66小区二次改造    mod   guo.xiaomin  20170816   start   -->
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="updateUserInfo(user, $index)">保存</button>
                                            <!--  宝宝树66小区二次改造    mod   guo.xiaomin  20170816   end   -->
                                        </div>
                                    </div>
                                </div>

                                <!--设置父母小区-->
                                <div class="am-modal am-modal-no-btn" id="doc-modal-parents-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">设置父母小区
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>

                                        <div class="am-modal-bd body-area">
                                            <div style = "width:80%" class = "text-left">
                                                <form class="am-form-inline">
                                                    <label>父母所在小区:</label>
                                                    <div class = "city-cascading" style = "display: inline-block;" id = "cascad-parents-{{$index}}"></div>
                                                </form>
                                            </div>

                                        </div>
                                        <div class = "button-area border-top">
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="updateParents(user, $index,$event)">保存</button>
                                        </div>
                                    </div>
                                </div>

                                <!--设置为雷锋团-->
                                <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-lf-{{$index}}">
                                    <div class="am-modal-dialog">
                                        <div class="am-modal-hd border-bottom" style = "text-align: left;">确认设置用户为雷锋？
                                            <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                                        </div>

                                        <div class = "button-area border-top">
                                            <br>
                                            <button type="button" class="am-btn am-btn-success right-margin top-margin" ng-show="true" ng-click="handleLFSRole(user, 3 ,$index)">升雷锋</button>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </td>

                </tr>
                </tbody>
            </table>
        </form>
    </div>


    <!--<div class = "left-margin">共<span id = 'page_number'>{{pageNumber}}</span>页 <span>{{count}}条数据</span></div>-->



</div>

<script>


    Date.prototype.format = function (format) {
        var o = {
            "M+": this.getMonth() + 1, //month
            "d+": this.getDate(), //day
            "h+": this.getHours(), //hour
            "m+": this.getMinutes(), //minute
            "s+": this.getSeconds(), //second
            "q+": Math.floor((this.getMonth() + 3) / 3), //quarter
            "S": this.getMilliseconds() //millisecond
        };
        if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
                (this.getFullYear() + "").substr(4 - RegExp.$1.length));
        for (var k in o) if (new RegExp("(" + k + ")").test(format))
            format = format.replace(RegExp.$1,
                    RegExp.$1.length == 1 ? o[k] :
                            ("00" + o[k]).substr(("" + o[k]).length));
        return format;
    };

    var fromDate = $('#startDate').datepicker().on('changeDate', function (ev) {
        //alert(ev.date.format('yyyy-MM-dd'));
        //$scope.startDate=ev.date.format('yyyy-MM-dd');
        $("#startDate").val(ev.date.format('yyyy-MM-dd'));
//        alert(ev.date);
    });

    var toDate = $('#endDate').datepicker().on('changeDate', function (ev) {
        // alert(ev.date.format('yyyy-MM-dd'));
        //$scope.endDate=ev.date.format('yyyy-MM-dd');
        $("#endDate").val(ev.date.format('yyyy-MM-dd'));
    });

    var hideContent = function(obj){
        $("#display_hide_content").css("display","block");
        $("#display_hide_content1").text(obj.innerText);
        $("#display_hide_content")[0].style.left = obj.offsetLeft + "px";
        $("#display_hide_content")[0].style.top = 60 + obj.offsetTop + "px";
    };

    $("#display_hide_close").on("click",function(){
        $("#display_hide_content").css("display","none");
    });

</script>